view,
scroll-view,
swiper,
swiper-item,
cover-view,
cover-image,
icon,
text,
rich-text,
progress,
button,
checkbox,
form,
input,
label,
radio,
slider,
switch,
textarea,
navigator,
audio,
camera,
image,
video {
  box-sizing: border-box;
}

/* 骨架屏替代方案 */
.Skeleton {
  background: #f3f3f3;
  padding: 20upx 0;
  border-radius: 8upx;
}

/* 图片载入替代方案 */
.image-wrapper {
  font-size: 0;
  background: #f3f3f3;
  border-radius: 4px;

  image {
    width: 100%;
    height: 100%;
    transition: .6s;
    opacity: 0;

    &.loaded {
      opacity: 1;
    }
  }
}

/*.title clamp {*/
/*	overflow: hidden;*/
/*	text-overflow: ellipsis;*/
/*	white-space: nowrap;*/
/*	display: block;*/
/*}*/

.common-hover {
  background: #f5f5f5;
}

/*边框*/
.b-b:after,
.b-t:after {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  height: 0;
  content: '';
  transform: scaleY(.5);
  border-bottom: 1px solid $border-color-base;
}

.b-b:after {
  bottom: 0;
}

.b-t:after {
  top: 0;
}

/* button样式改写 */
uni-button,
button {
  height: 80upx;
  line-height: 80upx;
  font-size: $font-lg + 2upx;
  font-weight: normal;

  &.no-border:before,
  &.no-border:after {
    border: 0;
  }
}

uni-button[type=default],
button[type=default] {
  color: $font-color-dark;
}

/* input 样式 */
.input-placeholder {
  color: #999999;
}

.placeholder {
  color: #999999;
}

.mp-search-box {
  position: absolute;
  left: 0;
  top: 15upx;
  z-index: 9999;
  width: 100%;
  padding: 0 30upx;

  .icon-search {
    margin-left: 20upx;
    position: absolute;
    top: 8upx;
  }

  .ser-input {
    flex: 1;
    height: 56upx;
    line-height: 56upx;
    font-size: 28upx;
    padding-left: 72upx;
    color: $font-color-base;
    border-radius: 20px;
    background: rgba(255, 255, 255, .6);
  }
}


.in1line {
  display: -webkit-box !important;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 1;
}

.in2line {
  display: -webkit-box !important;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2;
}

.in10line {
  display: -webkit-box !important;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 10;
}

.rf-product-list {
  display: flex;
  flex-wrap: wrap;
  padding: 0 30upx;
  background: #fff;

  .product-item {
    box-shadow: 2px 2px 10px rgba(66, 135, 193, 0.1); // 阴影
    display: flex;
    flex-direction: column;
    width: 48%;
    margin-bottom: 30upx;

    &:nth-child(2n+1) {
      margin-right: 4%;
    }
  }

  .image-wrapper {
    width: 100%;
    height: 320upx;
    border-radius: 6upx;
    overflow: hidden;
    position: relative;

    image {
      width: 100%;
      height: 100%;
      opacity: 1;
    }

    .sketch {
      width: 100%;
      background-color: rgba(0, 0, 0, 0.4);
      position: absolute;
      border-bottom-left-radius: 6upx;
      bottom: 0;
      padding: 0 8upx;
      right: 0;
      color: #fff;
      font-size: $font-sm;
    }
  }

  .title {
    font-size: $font-base;
    color: $font-color-dark;
    line-height: 1.2;
    margin: 10upx 0 4upx;
    height: 60upx;
  }

  .last-line {
    display: flex;
    justify-content: space-between;
    align-items: center; /* 垂直居中 */
    .red {
      color: $base-color;
      font-size: $font-sm + 2upx;
      margin-right: 2upx;
    }

    .sales {
      font-size: $font-sm + 2upx;
    }
  }

  .price {
    font-size: $font-base;
    color: $uni-color-primary;
    line-height: 1;

    &:before {
      content: '￥';
      font-size: 26upx;
    }

    .m-price {
      margin-left: 4upx;
      color: $font-color-light;
      font-size: $font-sm;
      text-decoration: line-through;
    }
  }
}

.bg-base-color {
  background-color: $base-color;
  color: #ffffff;
}

.text-base-color {
  color: rgba(219, 63, 96, 0.5);
}


// navBar样式
.navbar{
    display: flex;
    height: 40px;
    padding: 0 5px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,.06);
    position: relative;
    z-index: 10;
    .nav-item{
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
        font-size: 15px;
        color: $font-color-dark;
        position: relative;
        &.current{
            color: $base-color;
            &:after{
                content: '';
                position: absolute;
                left: 50%;
                bottom: 0;
                transform: translateX(-50%);
                width: 44px;
                height: 0;
                border-bottom: 2px solid $base-color;
            }
        }
    }
}
